﻿#ifndef AUDIOFILTER_H
#define AUDIOFILTER_H

#include <QThread>
#include <QDebug>
#include "header.h"

#define IN_PCM_BUF_SIZE 8192
#define OUT_PCM_BUF_SIZE 40960

struct AudioParm
{
    int sampleRate;
    int channel;
    int byteSize;
    AVSampleFormat format;

    std::string filePath;
};

class AudioFilter : public QThread
{
public:
    AudioFilter();
    ~AudioFilter();

    //运行状态
    void setRunState(bool start);

    //参数设置
    void setAudioParm(AudioParm &parm1, AudioParm &parm2);

protected:
    void run();

private:
    volatile bool isRun;

    //输入流信息
    AudioParm parmIn1;
    AudioParm parmIn2;
};

#endif // AUDIOFILTER_H
